package com.weaver.drools.business.execution.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.weaver.drools.business.execution.service.IEAqInsTreatmentmeasure422Service;
import com.weaver.drools.common.dao.EAqInsTreatmentmeasure422Dao;
import com.weaver.drools.common.entity.EAqInsTreatmentmeasure422;
@Service
public class EAqInsTreatmentmeasure422ServiceImpl implements IEAqInsTreatmentmeasure422Service {

	@Autowired
	private EAqInsTreatmentmeasure422Dao EAqInsTreatmentmeasure422Dao;
	@Override
	public EAqInsTreatmentmeasure422 findById(Long treatmentmeasureid) {
		// TODO Auto-generated method stub
		return EAqInsTreatmentmeasure422Dao.findEAqInsTreatmentmeasure422ByTreatmentmeasureid(treatmentmeasureid);
	}

	@Override
	public void saveEAqInsTreatmentmeasure422(EAqInsTreatmentmeasure422 treatmentmeasure422) {
		EAqInsTreatmentmeasure422Dao.saveOrUpdate(treatmentmeasure422);
	}

	@Override
	public void updateEAqInsTreatmentmeasure422(EAqInsTreatmentmeasure422 treatmentmeasure422) {
		EAqInsTreatmentmeasure422Dao.saveOrUpdate(treatmentmeasure422);
	}

	@Override
	public void deleteById(Long treatmentmeasureid) {
		EAqInsTreatmentmeasure422Dao.deleteById(treatmentmeasureid);
	}

	@Override
	public EAqInsTreatmentmeasure422 findNotCurrentBeanByInpectionPandectId(Long inpectionPandectId) throws Exception {
		String hql="from EAqInsTreatmentmeasure422 where isdeleted=0 and DRectifytype126.rectifytypeid!=1 and EAqInsInpectionpandect599.inpectionpandectid="+inpectionPandectId;
		EAqInsTreatmentmeasure422 treatmentmeasure422 = EAqInsTreatmentmeasure422Dao.findEntity(hql);
		return treatmentmeasure422;
	}

}
